package com.oocl.PlantsVsZombies;

import java.io.File;

public class Peashooter extends Plant implements Shootable{
	public Peashooter(){
		super();
		hitPiont = 300.0;
		attackPiont = 20.0;
		range = 1;
		cost = 100;
		posColumn=0;
		posRow=2;
		isAlive=true;
	}
	public Peashooter(int col,int row,Field f){
		super();
		hitPiont = 300.0;
		attackPiont = 20.0;
		range = 1;
		cost = 100;
		posColumn=col;
		posRow=row;
		isAlive=true;
		field=f;
		field.hasPlants[row][col]=true;
	}
	public boolean shoot(Zombie z) {
		if(z.posRow==this.posRow)
		{
			z.hpCutDown(this.attackPiont);
			return true;
		}
		else return false;
	}
	
}
